Skip to content

Conversation

@Badal1234
Copy link
Contributor

@Badal1234 Badal1234 commented Mar 10, 2020

Screenshot_1583852819

@RocketChat/ReactNative

Closes #1825

@CLAassistant
Copy link

CLAassistant commented Mar 10, 2020

CLA assistant check
All committers have signed the CLA.

@Badal1234 Badal1234 changed the title fix Can't open attachments on Tablet Can't open attachments on Tablet Mar 10, 2020
@Badal1234 Badal1234 changed the title Can't open attachments on Tablet [FIX]Can't open attachments on Tablet Mar 10, 2020
app/index.js Outdated
);

if (isAndroid) {
if (isAndroid && !isTablet) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Badal1234! It's not correct 😅.
If we're showing this component we have certain that is a tablet, then it'll always evaluates to true and never enter on this condition, we're needing this ScrollView because we have some modals that have inputs and the keyboard is opened, it was added by #1742 and we can't do this condition here because it'll broken this fix.
Maybe you can use pageSheet value to handle the ScrollView and only add the ScrollView when isAndroid && !pageSheet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @djorkaeffalexandre ,for your review and suggestion.

@Badal1234
Copy link
Contributor Author

You are right @djorkaeffalexandre, this change does not affect the previous fix.
Thanks

@djorkaeffalexandre djorkaeffalexandre changed the title [FIX]Can't open attachments on Tablet [FIX] Can't open attachments on Tablet Mar 24, 2020
@djorkaeffalexandre
Copy link
Contributor

Hey @Badal1234, I tested it here and works fine with the proposal, but can you try to fix the error about the navigation on tablet?
I think we are navigating to RoomActionsView before navigate to AttachmentView and it raises some errors when you're opening some image on chat.
It maybe related to tablet.js and app/index.js and how the stack are configured when the app is splited.
Thanks in advance.

@Badal1234
Copy link
Contributor Author

Sorry, @djorkaeffalexandre I didn't get any such error. When we close the modal it navigates to RoomActionView.when we open any image it navigates to AttachmentView.Correct me if I am wrong.
Thanx

@djorkaeffalexandre
Copy link
Contributor

@Badal1234 check the logs of the app. :) It's trying to access data from room when you open some attachment on RoomView, because are navigating to RoomActionsView before go to AttachmentView. :(

@Badal1234
Copy link
Contributor Author

I have resolved the navigation error.The error is at RoomActionsStack.@djorkaeffalexandre review it and corrects any error.
Thank you

@Badal1234 Badal1234 closed this Apr 3, 2020
@Badal1234 Badal1234 deleted the fix-tablet-error branch April 3, 2020 19:18
@Badal1234 Badal1234 restored the fix-tablet-error branch April 3, 2020 19:22
@Badal1234
Copy link
Contributor Author

Due to some issue I have closed this PR.
Refer to
[fix] tablet attachment and navigation #1986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Can't open attachments on Tablet (Android)

4 participants